package activity

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.activity.viewModels
import com.wd.common.base.BaseActivity
import com.wd.common.bean.QuestionXqBean
import com.wd.common.viewmodel.MyViewModel
import com.wd.rim.R
import com.wd.rim.databinding.ActivityQuestionXqBinding

class QuestionXqActivity : BaseActivity<ActivityQuestionXqBinding,Any?>() {
    private val mviewModel:MyViewModel by viewModels()
    override fun getViewBinding()=ActivityQuestionXqBinding.inflate(layoutInflater)


    override fun initData() {
        val problemId = intent.getIntExtra("UId",0)
        if (problemId != null) {
            mviewModel.getQuestionXq("$problemId")
        }

        mviewModel.questionXq.observe(this){
//            it.result.nickName.let {
//                binding.name.setText(it)
//            }
            binding.name.setText(it.result.nickName)
            


        }
    }
}